package com.lancoo.znbkxx.beans;

import android.support.annotation.NonNull;

import com.lancoo.znbkxx.adapter.BaseExpandableRecyclerViewAdapter;

import java.io.Serializable;
import java.util.List;

/**
 * Create by TangJun on 2019/2/16
 */
public class SampleGroupBean implements BaseExpandableRecyclerViewAdapter.BaseGroupBean<SamplePaperBean>,Serializable {

    private List<SamplePaperBean> mList;
    private String mName;
    private String mSubNum;
    private String mCompleteNum;
    private String mTime;
    private int mLayer;

    public SampleGroupBean(@NonNull List<SamplePaperBean> list, @NonNull String name, @NonNull String subNum, @NonNull String completeNum, @NonNull String time, @NonNull int layer) {
        mList = list;
        mName = name;
        mCompleteNum = completeNum;
        mTime = time;
        mSubNum = subNum;
        mLayer = layer;
    }

    @Override
    public int getChildCount() {
        return mList.size();
    }

    @Override
    public boolean isExpandable() {
        return getChildCount() > 0;
    }

    public String getName() {
        return mName;
    }
    public String getCompleteNum(){
        return mCompleteNum;
    }
    public String getmTime(){
        return mTime;
    }
    public String getmSubNum(){
        return mSubNum;
    }
    public int getmLayer(){
        return mLayer;
    }
    public List<SamplePaperBean> getList(){
        return mList;
    }
    @Override
    public SamplePaperBean getChildAt(int index) {
        return mList.size() <= index ? null : mList.get(index);
    }
}